package com.example.hcd.datamanage;

import java.text.SimpleDateFormat;
import java.util.Date;

import android.content.Context;

public class SealuseData {
	private Context context;
	
	private String sealName;
	private String isLendingout;
	private String returnTime;
	private String remark;
	//业务ID
	private String id;
	//流程ID
	private String processInstanceId;
	//申请人ID
	private String userId;
	//申请人姓名
	private String userName;
	//申请人部门
	private String deptName;
	//申请时间
	private String createtime;
	//预计归还时间
	private String estimereturn;
	//用章接收时间
	private String receivetime;
	//流程状态
	private String processStatus;
	//流程状态值
	private String processStatusValue;
	//申请人姓名部门
	private String applicant;
	
	public SealuseData(Context context)
	{
		this.context = context;
	}

	public String getSealName() {
		return sealName;
	}

	public void setSealName(String sealName) {
		this.sealName = sealName;
	}

	public String getIsLendingout() {
		
		return isLendingout;
	}

	public void setIsLendingout(String isLendingout) {
		this.isLendingout = isLendingout;
	}

	public String getReturnTime() {
		if(returnTime==null)
		{
			return null;
		}
		SimpleDateFormat mFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
		long time = Long.parseLong(returnTime);
		return mFormat.format(new Date(time));
	}

	public void setReturnTime(String returnTime) {
		this.returnTime = returnTime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getProcessInstanceId() {
		return processInstanceId;
	}

	public void setProcessInstanceId(String processInstanceId) {
		this.processInstanceId = processInstanceId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getCreatetime() {
		SimpleDateFormat mFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
		long time = Long.parseLong(createtime);
		return mFormat.format(new Date(time));
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}

	public String getEstimereturn(boolean isneedGeshi) {
		if(estimereturn==null||estimereturn.equals(""))
		{
			return "时间获取错误";
		}
		
		if(isneedGeshi)
		{
			SimpleDateFormat mFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
			long time = Long.parseLong(estimereturn);
			return mFormat.format(new Date(time));
		}else
		return estimereturn;
	}

	public void setEstimereturn(String estimereturn) {
		this.estimereturn = estimereturn;
	}

	public String getReceivetime() {
		if(receivetime==null)
		{
			return null;
		}
		
		SimpleDateFormat mFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
		long time = Long.parseLong(receivetime);
		return mFormat.format(new Date(time));
	}

	public void setReceivetime(String receivetime) {
		this.receivetime = receivetime;
	}

	public String getProcessStatus() {
		return processStatus;
	}

	public void setProcessStatus(String processStatus) {
		this.processStatus = processStatus;
	}

	public String getProcessStatusValue() {
		return processStatusValue;
	}

	public void setProcessStatusValue(String processStatusValue) {
		this.processStatusValue = processStatusValue;
	}

	public String getApplicant() {
		return applicant;
	}

	public void setApplicant(String applicant) {
		this.applicant = applicant;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

}
